package cn.gson.fengboot.controller;

import cn.gson.fengboot.model.pojos.TfyrelationwarnFrom;
import cn.gson.fengboot.model.service.TfyrelationwarnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Controller
public class TfyrelationwarnController {
    @Autowired
    TfyrelationwarnService tfyrelationwarnService;

    @PostMapping("/addlxtx-list")
    @ResponseBody
    public void addrelationwarn(@RequestBody TfyrelationwarnFrom lxtx){
        //新增联系提醒方法
        tfyrelationwarnService.addrelationwarn(lxtx);
    }

    @RequestMapping("/cxidlxtx-list")
    public List<TfyrelationwarnFrom> cxidrelationwarn(Integer clientId){
        //根据客户id查询联系提醒信息
        return tfyrelationwarnService.cxidrelationwarn(clientId);
    }

    @RequestMapping("/wcidlxtx-list")
    public List<TfyrelationwarnFrom> wcidrelationwarn(Integer clientId){
        //根据客户id查询已完成联系提醒信息
        return tfyrelationwarnService.wcidrelationwarn(clientId);
    }

    @RequestMapping("/yqidlxtx-list")
    public List<TfyrelationwarnFrom> yqidrelationwarn(Integer clientId){
        //根据客户id查询已延期联系提醒信息
        return tfyrelationwarnService.yqidrelationwarn(clientId);
    }

    @RequestMapping("/lxridlxtx-list")
    public List<TfyrelationwarnFrom> lxridrelationwarn(Integer linkmanId){
        //根据联系人id查询联系提醒信息
        return tfyrelationwarnService.lxridrelationwarn(linkmanId);
    }

    @RequestMapping("/lxrwcidlxtx-list")
    public List<TfyrelationwarnFrom> lxrwcidrelationwarn(Integer linkmanId){
        //根据联系人id查询已完成联系提醒信息
        return tfyrelationwarnService.lxrwcidrelationwarn(linkmanId);
    }

    @RequestMapping("/lxryqidlxtx-list")
    public List<TfyrelationwarnFrom> lxryqidrelationwarn(Integer linkmanId){
        //根据联系人id查询已延期联系提醒信息
        return tfyrelationwarnService.lxryqidrelationwarn(linkmanId);
    }

    @RequestMapping("/jridlxtx-list")
    public List<TfyrelationwarnFrom> jridrelationwarn(Integer empId){
        //根据员工id查询今日联系提醒信息
        return tfyrelationwarnService.jridrelationwarn(empId);
    }

    @RequestMapping("/mridlxtx-list")
    public List<TfyrelationwarnFrom> mridrelationwarn(Integer empId){
        //根据员工id查询明日联系提醒信息
        return tfyrelationwarnService.mridrelationwarn(empId);
    }

    @RequestMapping("/jjidlxtx-list")
    public List<TfyrelationwarnFrom> jjidrelationwarn(Integer empId){
        //根据员工id查询即将联系提醒信息
        return tfyrelationwarnService.jjidrelationwarn(empId);
    }

    @RequestMapping("/yyqidlxtx-list")
    public List<TfyrelationwarnFrom> yyqidrelationwarn(Integer empId){
        //根据员工id查询已延期联系提醒信息
        return tfyrelationwarnService.yyqidrelationwarn(empId);
    }

    @PostMapping("/xgztlxtx-list")
    @ResponseBody
    public void xgztrelationwarn(@RequestBody TfyrelationwarnFrom lxtx){
        //修改联系提醒状态方法
        tfyrelationwarnService.xgztrelationwarn(lxtx);
    }

    @PostMapping("/xgztwlxtx-list")
    @ResponseBody
    public void xgztwrelationwarn(@RequestBody TfyrelationwarnFrom lxtx){
        //修改联系提醒状态0方法
        tfyrelationwarnService.xgztwrelationwarn(lxtx);
    }

    @PostMapping("sclxtx-list")
    @ResponseBody
    public void sclxtx(@RequestBody TfyrelationwarnFrom lxtx){
        //联系提醒物理删除
        tfyrelationwarnService.sclxtx(lxtx);
    }

    @RequestMapping("delrelationwarn-list")
    @ResponseBody
    public void deleteRelationwarn(String khdx){
        //联系提醒批量物理删除
        tfyrelationwarnService.deleteRelationwarn(khdx);
    }

    @RequestMapping("lxrlxtx-list")
    @ResponseBody
    public List<TfyrelationwarnFrom> lxrlxtx(int linkmanId){
        //根据联系人id查询联系提醒
        return tfyrelationwarnService.lxrlxtx(linkmanId);
    }
}
